home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / exampleCode / opengl / GLUT / lib / glut / glut_tablet.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-11  |  960 b   |  32 lines

  1.  
  2. /* Copyright (c) Mark J. Kilgard, 1994. */
  3.  
  4. /* This program is freely distributable without licensing fees
  5.    and is provided without guarantee or warrantee expressed or
  6.    implied. This program is -not- in the public domain. */
  7.  
  8. #include "glutint.h"
  9.  
  10. void
  11. glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc)
  12. {
  13.   __glutCurrentWindow->tabletMotion = tabletMotionFunc;
  14.   __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask;
  15.   __glutPutOnWorkList(__glutCurrentWindow,
  16.     GLUT_DEVICE_MASK_WORK);
  17.   /* If deinstalling callback, invalidate tablet position. */
  18.   if (tabletMotionFunc == NULL) {
  19.     __glutCurrentWindow->tabletPos[0] = -1;
  20.     __glutCurrentWindow->tabletPos[1] = -1;
  21.   }
  22. }
  23.  
  24. void
  25. glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc)
  26. {
  27.   __glutCurrentWindow->tabletButton = tabletButtonFunc;
  28.   __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask;
  29.   __glutPutOnWorkList(__glutCurrentWindow,
  30.     GLUT_DEVICE_MASK_WORK);
  31. }
  32.